﻿using System.Windows;
using System.Windows.Input;

namespace FileClient.Wpf;

public class NotifyIconViewModel
{
    /// <summary>
    /// 激活窗口
    /// </summary>
    public ICommand ShowWindowCommand
    {
        get
        {
            return new DelegateCommand
            {
                CommandAction = () =>
                {
                    Application.Current.MainWindow.Show();
                    Application.Current.MainWindow.Activate();
                }
            };
        }
    }

    /// <summary>
    /// 隐藏窗口
    /// </summary>
    public ICommand HideWindowCommand
    {
        get
        {
            return new DelegateCommand
            {
                CommandAction = () => Application.Current.MainWindow.Hide()
            };
        }
    }


    /// <summary>
    /// 关闭软件
    /// </summary>
    public ICommand ExitApplicationCommand
    {
        get { return new DelegateCommand { CommandAction = () => Application.Current.Shutdown() }; }
    }
}